package admincow.servlet.toro;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import admincow.dao.ToroDAO;
import admincow.vo.ToroVO;

/**
 * Servlet implementation class for Servlet: UsuarioEditarServlet
 * 
 */
public class ToroEditarServlet extends javax.servlet.http.HttpServlet
		implements javax.servlet.Servlet {
	static final long serialVersionUID = 1L;

	/*
	 * (non-Java-doc)
	 * 
	 * @see javax.servlet.http.HttpServlet#HttpServlet()
	 */
	public ToroEditarServlet() {
		super();
	}

	
	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		String x = request.getParameter("RPtoro");
		//checar el idtoro===idToro
		ToroDAO dao = new ToroDAO();
		ToroVO vo = dao.obtenerPorRPtoro(x);
		request.setAttribute("RPtoro", vo);

		RequestDispatcher rd = request
				.getRequestDispatcher("/toroEditar.jsp");
		rd.forward(request, response);
	}

		protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}
}